Repository navigation
Streamline apt packages installed in CI - #8524
Conversation
The python3-tk package is vestigial in CI (PR quantumlib#1876): it installs Tkinter for Ubuntu's system Python 3.10, whereas actions/setup-python runs Python 3.11–3.14 from /opt/hostedtoolcache, which already bundles _tkinter. We can remove it from apt-system-requirements.txt In addition, if we add latexmk and poppler-utils explicitly, we can use the `--no-install-recommends` option to `apt install` in CI, which will reduce by roughly half 168 MB download it's currently doing for apt installing apt-system-requirements.txt.
As it was, `apt-get install apt-system-requirements.txt` pulled in large recommended font/doc/X11-viewer packages on every Changed files test, Coverage check, and Pytest Ubuntu job. By adjusting apt-system-requirements.txt and using `--no-install-recommends`, we can greatly reduce what needs to be downloaded and installed.
As it was, `apt-get install apt-system-requirements.txt` pulled in large recommended font/doc/X11-viewer packages on every Changed files test, Coverage check, and Pytest Ubuntu job. By adjusting apt-system-requirements.txt and using `--no-install-recommends`, we can greatly reduce what needs to be downloaded and installed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8524 +/- ##
==========================================
- Coverage 99.58% 99.58% -0.01%
==========================================
Files 1137 1137
Lines 105158 105158
==========================================
- Hits 104723 104719 -4
- Misses 435 439 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install $(cat apt-system-requirements.txt) | ||
| sudo apt-get install --no-install-recommends -y $(cat apt-system-requirements.txt) |
There was a problem hiding this comment.
Can you confirm this needs the -y option here?
There was a problem hiding this comment.
Hard to test locally. I'll remove it and see what happens in GitHub CI.
There was a problem hiding this comment.
Can you confirm this needs the
-yoption here?
Looks like it works without -y. Hmmmm … I'm going to try removing it everywhere and see if it still works.
There was a problem hiding this comment.
@pavoljuhas You're right; the flag is not needed.
Updated this PR to omit the flag. Thanks for noticing that!
pavoljuhas
left a comment
There was a problem hiding this comment.
Nice improvement! Please see an optional comment before merge.
The python3-tk package is vestigial in CI (PR #1876): it installs Tkinter for Ubuntu's system Python 3.10, whereas actions/setup-python runs Python 3.11–3.14 from /opt/hostedtoolcache, which already bundles _tkinter. We can remove it from apt-system-requirements.txt
In addition, if we add the latexmk, poppler-utils, and lmodern packages explicitly to
apt-system-requirements.txt, we can use the--no-install-recommendsoption toapt installin CI, which will reduce by roughly half of the 168 MB it currently downloads.